﻿<div ng-controller="publicationController">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-inverse">
                <div class="panel-heading">
                    <div class="panel-heading-btn">
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default"
                           data-click="panel-expand"><i class="fa fa-expand"></i></a>
                    </div>
                    <h4 class="panel-title">挂失管理</h4>
                </div>
                <div class="panel-body">
                    <div class="form-inline filter-option">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="pull-left">
                                    <button class="btn btn-primary" ng-click="showUploadModal()"><i
                                            class="fa fa-upload"></i>上传挂失数据
                                    </button>
                                </div>
                                <div class="pull-right">
                                    <input type="text" ng-model="filter.billNumber" placeholder="票据号"
                                           class="form-control">
                                    <input type="text" ng-model="filter.enterpriseName" placeholder="申请人"
                                           class="form-control">
                                    <input type="text" ng-model="filter.announceCourt" placeholder="公告法院"
                                           class="form-control">
                                    <!--
                                      <input type="number" ng-model="filter.money1" placeholder="金额" class="form-control">
                                      <input type="number" ng-model="filter.money2" placeholder="金额2" class="form-control">
                                    -->
                                    <input type="text" placeholder="请输入开始时间" id="start_time" name="start_time"
                                           class="form-control"/>
                                    <input type="text" placeholder="请输入结束时间" id="end_time" name="end_time"
                                           class="form-control"/>
                                    <button class="btn btn-sm btn-info" ng-click="reflash()"><i
                                            class="fa fa-search"></i> 筛选
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <table id="data-table" ng-table="tableParams" template-pagination="template/pagination.html"
                           class="table table-striped table-bordered table-hover table-condensed">
                        <tr ng-repeat="item in $data">
                            <td data-title="'序号'" width="10%" class="text-center">{{ first + $index }}</td>
                            <td data-title="'票据号'" class="text-left">{{ item.bill_number }}</td>
                            <td data-title="'票据金额'" class="text-left"><span ng-show="item.bill_sum_price">{{item.bill_sum_price}}</span><span ng-show="!item.bill_sum_price||item.bill_sum_price==0">未知</span></td>
                            <td data-title="'公告法院'" class="text-center">{{ item.announce_court }}</td>
                            <td data-title="'申请人'" class="text-left">{{ item.enterprise_name }}</td>
                            <td data-title="'出票时间'" class="text-left"><span ng-show="item.draw_time">{{ item.draw_time |date:'yyyy-MM-dd HH:mm:ss' }}</span><span ng-show="!item.draw_time">未知</span></td>
                            </td>
                            <td data-title="'公告时间'" class="text-center">{{ item.announce_time|date:'yyyy-MM-dd HH:mm:ss'
                                }}
                            </td>
                            <td class="text-center width-100 text-nowrap">
                                <button class="btn btn-info btn-xs" ng-click="show(item)">
                                    <i class="fa fa-edit"></i>
                                    显示详情
                                </button>
                                <button class="btn btn-info btn-xs" ng-click="delete(item)">
                                    <i class="fa fa-remove"></i>
                                    删除
                                </button>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="modal fade" id="modal-show">
                    <div class="modal-dialog" style="width:1100px">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                <h4 class="modal-title"><i class="fa fa-lg fa-edit text-success"></i>公催详情</h4>
                            </div>
                            <div class="modal-body">
                                <div class="form-horizontal">
                                    <div class="form-group width-full">
                                        <label class="control-label col-md-2"> 票据号：</label>
                                        <div class="col-md-4 form-control-static">
                                            {{ model.bill_number }}
                                        </div>
                                        <label class="control-label col-md-2">票据金额[元]：</label>
                                        <div class="col-md-4 form-control-static">
                                            {{ model.bill_sum_price | currency }}
                                        </div>
                                    </div>
                                    <div class="form-group width-full">
                                        <label class="control-label col-md-2"> 公告法院：</label>
                                        <div class="col-md-4 form-control-static">
                                            {{ model.announce_court }}
                                        </div>
                                        <label class="control-label col-md-2"> 申请人：</label>
                                        <div class="col-md-4 form-control-static">
                                            {{ model.enterprise_name }}
                                        </div>
                                    </div>
                                    <div class="form-group width-full">
                                        <label class="control-label col-md-2">总行名称：</label>
                                        <div class="col-md-4 form-control-static">
                                            {{ model.draw_time |date:'yyyy-MM-dd HH:mm:ss' }}
                                        </div>
                                        <label class="control-label col-md-2">分行名称：</label>
                                        <div class="col-md-4 form-control-static">
                                            {{ model.announce_time |date:'yyyy-MM-dd HH:mm:ss' }}
                                        </div>
                                    </div>
                                    <div class="form-group width-full">
                                        <label class="control-label col-md-2">备注说明：</label>
                                        <div class="col-md-10 form-control-static">
                                            {{ model.description }}
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-sm btn-white" data-dismiss="modal"><i
                                        class="fa fa-share-square-o"></i> 关闭
                                </button>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="modal fade" id="modal-upload">
                    <div class="modal-dialog" style="width:1100px">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                <h4 class="modal-title"><i class="fa fa-lg fa-edit text-success"></i>公催上传</h4>
                                <input type="button" class="btn btn-primary" value="下载模板"
                                       onclick="window.location.href='http://hpx-file.oss-cn-hangzhou.aliyuncs.com/templet/%E5%85%AC%E5%82%AC%E6%9F%A5%E8%AF%A2%E6%A8%A1%E6%9D%BF.xls'"/>

                            </div>
                            <div class="modal-body">
                                <div class="container">
                                    <div class="row">
                                        <div class="col-sm-12">
                                            <p class="text-center text-danger">请上传Excel文件（仅支持97-03的Excel文件格式[*.xls]）：</p>

                                        </div>
                                        <div class="col-sm-12">
                                            <input id="publicationFile" type="file" class="btn btn-info" />
                                            <input type="button" ng-click="uploadFile()" class="btn btn-primary" value="上传">
                                        </div>
                                        <hr/>
                                        <div class="col-sm-12">
                                            {{nowFile.name}}
                                        </div>
                                    </div>
                                </div>

                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-sm btn-white" data-dismiss="modal"><i
                                        class="fa fa-share-square-o"></i> 关闭
                                </button>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>

